<form class="layui-form" action="{:url()}" method="post" id="editForm">
    
    <div class="layui-form-item">
        <label class="layui-form-label">产品名称</label>
        <div class="layui-input-inline">
            <input type="text" data-disabled class="layui-input field-name" name="name" disabled="disabled">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">副标题</label>
        <div class="layui-input-inline">
            <input type="text" data-disabled class="layui-input field-sub_name" name="sub_name" autocomplete="off" disabled="disabled">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">商品主图</label>
            <div class="layui-input-inline upload1">
                {if condition="!empty($formData['share_img'])"}
                <img src="{$formData['share_img']}" style="border-radius:5px;border:1px solid #ccc" width="36" height="36">
                {else /}
                <img src="" style="display:none;border-radius:5px;border:1px solid #ccc" width="36" height="36">
                {/if}
            </div>
    </div>
    
    <div class="layui-form-item">
        <label class="layui-form-label">是否参与分销</label>
        <div class="layui-input-inline" id="flag">
            <input type="radio" name="is_fenxiao" value="1" title="参与" {:$formData['is_fenxiao']==1?'checked':''}>
            <input type="radio" name="is_fenxiao" value="0" title="不参与" {:$formData['is_fenxiao']==0?'checked':''}>
        </div>
    </div>

    

    <div class="layui-form-item">
        <label class="layui-form-label">一级佣金设置</label>
        <div class="layui-input">
            <input type="text" data-disabled class="layui-input-inline field" name="one_level_percent" autocomplete="off" value="{:$formData['one_level_percent']>0?$formData['one_level_percent']:$fx_init_rule['one_level_percent']}">%
        </div>
    </div>
    
    <div class="layui-form-item">
        <label class="layui-form-label">二级佣金设置</label>
        <div class="layui-input">
            <input type="text" data-disabled class="layui-input-inline field" name="two_level_percent" autocomplete="off" value="{:$formData['two_level_percent']>0?$formData['two_level_percent']:$fx_init_rule['two_level_percent']}">%
        </div>
    </div>

    <div class="pop-bottom-bar hisi-footer">
        <input type="hidden" name="id" value="{$formData['id']}">
        <button type="submit" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="formSubmit" lay-data="{pop: true, refresh: true}">提交保存</button>
        <a href="javascript:parent.layui.layer.closeAll();" class="layui-btn layui-btn-primary ml10">取消</a>
    </div>
</form>
{include file="system@block/layui" /}
<script>
var s = "";
layui.use(['func'], function() {
    layui.func.assign({:json_encode($formData)});
});

layui.use(["jquery", "upload", "form", "layer", "element"], function () {
    var $ = layui.$,
        element = layui.element,
        layer = layui.layer,
        upload = layui.upload,
        form = layui.form;
});

layui.use(['form', 'layedit'], function () {
    var form=layui.form,layedit=layui.layedit;
    var index1 = layedit.build('LAY_demo1', {
            tool: ['strong', 'italic', 'underline', 'del', '|', 'left', 'center', 'right'],
            height: 200
        });
});

</script>
<!--
/**
 * editor 富文本编辑器
 * @param array $obj 编辑器的容器ID
 * @param string $name [为了方便大家能在系统设置里面灵活选择编辑器，建议不要指定此参数]，目前支持的编辑器[ueditor,umeditor,ckeditor,kindeditor]
 * @param string $upload [选填]附件上传地址
 */
-->
{:editor(['UMeditor1', 'UMeditor2'])}
{:editor(['kindeditor1', 'kindeditor2'], 'kindeditor')}
{:editor(['UEditor1', 'UEditor2'], 'ueditor')}
{:editor(['ckeditor', 'ckeditor2'], 'ckeditor')}